<?php
/**
 * Created by PhpStorm.
 * Author: Sojo
 * Date: 2017/2/28
 * Time: 16:54
 */
namespace App\Api\Service\Test\Models;
use Framework\BaseClass\Eloquent\Model;

class Employee extends Model
{
    protected $table = 'owner_employee';

    public function ownerInfo()
    {
        return $this->belongsTo('App\Api\Service\Test\Models\Owner', 'owner_id', 'id');
    }

    public function userInfo()
    {
        return $this->belongsTo('App\Eloquent\Ygt\User', 'user_id', 'id');
    }

    public function ownerVisitor()
    {
        return $this->hasMany('App\Eloquent\Owner\Visitor', 'owner_employee_id', 'id');
    }
}